package com.cre_drt;

import android.app.ActionBar;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

public class TaskSelectionScreen extends ActivityTimeout {

	boolean buttonPressed;
	
	SessionManager session;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.task_selection_screen);
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
		ActionBar actionBar = getActionBar();
		actionBar.setTitle("Damage Assessment Reporting");
		actionBar.setSubtitle("Task Selection");

		session = new SessionManager(getApplicationContext());
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		// getMenuInflater().inflate(R.menu.task_selection_screen, menu);
		return true;
	}

	public void GLCSearchScreen(View view) {
		if (buttonPressed == true) {
			return;
		}
		else {
			buttonPressed = true;
		}
		Intent GLCIntent = new Intent(this, IncidentSearchScreen.class);
		startActivity(GLCIntent);
	}

	public void cannedReportFilterScreen(View view) {
		if (buttonPressed == true) {
			return;
		}
		else {
			buttonPressed = true;
		}
		Intent reportSelectionIntent = new Intent(this, ReportSelectionScreen.class);
		startActivity(reportSelectionIntent);
	}
	
	@Override
	public void onStart() {
		super.onStart();
		buttonPressed = false;
	}
}
